package com.laiketui.app.controller.color;

import com.laiketui.common.api.color.ColorService;
import com.laiketui.common.api.index.IndexDataService;
import com.laiketui.common.api.material.MaterialService;
import com.laiketui.core.domain.Result;
import com.laiketui.domain.vo.color.ColorVo;
import com.laiketui.domain.vo.index.IndexDataVo;
import com.laiketui.domain.vo.material.MaterialVo;
import com.laiketui.root.annotation.HttpApiMethod;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 颜色展示
 */
@RestController
public class ColorController {
    @Autowired
    private ColorService colorService;

    @ApiOperation("查询颜色列表数据")
    @RequestMapping("/getColorInfo")
    @HttpApiMethod(apiKey = "app.color.getColorInfo")
    public Result getMaterialInfo(ColorVo vo){
        return Result.success(colorService.selectInfo(vo));
    }

    @PostMapping("getColorList")
    @HttpApiMethod(urlMapping = "app.color.getColorList")
    public Result getColorList(ColorVo vo){
        return Result.success(colorService.getColorList(vo));
    }
}
